﻿CREATE TABLE [HumanResources].[TempH] (
    [TID]    INT                 IDENTITY (1, 1) NOT NULL,
    [TNode]  [sys].[hierarchyid] NULL,
    [TLevel] AS                  ([TNode].[GetLevel]()),
    [TNAme]  VARCHAR (20)        NOT NULL,
    PRIMARY KEY NONCLUSTERED ([TID] ASC)
);


GO
CREATE UNIQUE CLUSTERED INDEX [IX_TempHNc1]
    ON [HumanResources].[TempH]([TLevel] ASC, [TNode] ASC, [TID] ASC);

